package com.attempt.grab.task;

import com.attempt.grab.service.RobotService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

/**
 * @author xuhaifeng
 * @since 2022年02月25日 下午 2:05
 */
@Slf4j
@Component
public class CaptureTask implements CommandLineRunner {
    private final RobotService service;

    @Autowired
    public CaptureTask(RobotService service) {this.service = service;}

    @Override
    public void run(String... args) {
        service.startCaptureTask();
    }
}
